var xhr = {
    // baseUrl: 'http://192.168.156.144:8881',
    baseUrl: '',
    send: function (url, param, callback) {
        $.ajax({
            url: this.baseUrl + url,
            data: param,
            method: 'POST',
            success: function (res) {
                if (res.code == 0) {
                    callback && callback(res)
                } else {
                    alert(res.msg)
                }
            },
            error: function (error) {
                console.log(error)
            }
        })
    },
    upload: function (url, param, callback) {
        $.ajax({
            url: this.baseUrl + url,
            data: param,
            method: 'POST',
            contentType: false,
            processData: false,
            success: function (res) {
                if (res.code == 0) {
                    callback && callback(res)
                } else {
                    alert(res.msg)
                }
            },
            error: function (error) {
                console.log(error)
            }
        })
    }
}